package com.lin.app;

import com.lin.app.service.IAService;
import com.lin.app.service.IBService;
import com.lin.app.service.IUserService;
import com.lin.app.service.UserService;
import com.lin.springframework.JianlinApplicationContext;

public class MyApplication {

    public static void main(String[] args) throws Exception {
        JianlinApplicationContext ioc = new JianlinApplicationContext(AppConfig.class);
        IUserService userService = (IUserService) ioc.getBean("jianlinService");
        userService.say();

        // 动态代理测试
        IAService aService = (IAService) ioc.getBean("AService");
        System.out.println(aService.getClass());
        // 2个线程
        IBService bService = (IBService) ioc.getBean("BService");
        bService.say();
    }
}
